<!--
/**
 * moOde audio player (C) 2014 Tim Curtis
 * http://moodeaudio.org
 *
 * This Program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3, or (at your option)
 * any later version.
 *
 * This Program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * 汉化：Androidnews
 */
-->
<div id="container">
<div class="container">
	<h1 class="per-config">外围设备</h1>

	<form class="form-horizontal" method="post">
		<div class="control-group $_feat_localui">
			<legend>本地显示</legend>

			<label class="control-label">显示</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-localui" for="toggle-localui-2">开</label>$_select[localui_on]
					<label class="toggle-radio toggle-localui" for="toggle-localui-1">关</label>$_select[localui_off]
				</div>
                <button id="btn-set-localui" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_localui" value="novalue">设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-localui" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-localui" class="config-help-info">
					在本地连接的显示器上显示moOde UI。
                </span>
            </div>

			<label class="control-label">播放时唤醒</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-wake-display" for="toggle-wake-display-2">开</label>$_select[wake_display_on]
					<label class="toggle-radio toggle-wake-display" for="toggle-wake-display-1">关</label>$_select[wake_display_off]
				</div>
                <button id="btn-set-wake-display" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_wake_display" value="novalue" $_localui_btn_disable>设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info_wake_display" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info_wake_display" class="config-help-info">
					音频开始播放时唤醒显示器。
                </span>
            </div>

			<label class="control-label">鼠标光标</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-touchscn" for="toggle-touchscn-2">开</label>$_select[touchscn_on]
					<label class="toggle-radio toggle-touchscn" for="toggle-touchscn-1">关</label>$_select[touchscn_off]
				</div>
                <button id="btn-set-touchscn" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_touchscn" value="novalue" $_localui_btn_disable>设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-touchscn" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-touchscn" class="config-help-info">
					这可防止光标出现在显示屏或触摸屏上
                </span>
            </div>

			<label class="control-label">弹出式键盘</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-on-screen-kbd" for="toggle-on-screen-kbd-2">开</label>$_select[on_screen_kbd_on]
					<label class="toggle-radio toggle-on-screen-kbd" for="toggle-on-screen-kbd-1">关</label>$_select[on_screen_kbd_off]
				</div>
                <button id="btn-set-on-screen-kbd" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_on_screen_kbd" value="novalue" $_localui_btn_disable>设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-on-screen-kbd" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-on-screen-kbd" class="config-help-info">
					屏幕弹出键盘 by @Nutul.
                </span>
            </div>

			<label class="control-label" for="scnblank">屏幕空白</label>
			<div class="controls">
				<select id="scnblank" class="config-select-large" name="scnblank">
					$_select[scnblank]
				</select>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_scnblank" value="novalue" $_localui_btn_disable>设置</button>
			</div>

			<div class="controls">
				<button class="btn btn-primary btn-medium config-btn btn-submit" type="submit" name="update_toggle_coverview" value="novalue" $_localui_btn_disable>切换</button>
				<span class="config-btn-after">封面视图</span>
				<span class="config-help-static">
					切换当前状态: $_coverview_onoff
				</span>
			</div>

			<div class="controls">
				<a data-toggle="modal" href="#restart-localui" $_localui_link_disable><button class="btn btn-medium btn-primary config-btn" $_localui_btn_disable>重新启动</button></a>
				<span class="config-btn-after">本地显示</span>
				<span class="config-help-static">
					重启会清除chromium浏览器缓存。
				</span>
			</div>
		</div>

		<div class="control-group">
			<legend>Pi 7英寸触摸</legend>

			<label class="control-label" for="scnbrightness">亮度</label>
			<div class="controls">
            	<input class="config-input-large" type="number" maxlength="3" min="0" max="255" id="scnbrightness" name="scnbrightness" value="$_select[scnbrightness]">
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_scnbrightness" value="novalue" $_localui_btn_disable>设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-brightness" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-brightness" class="config-help-info">
					7英寸Pi触摸屏的背光亮度。值为0 - 255。
                </span>
			</div>

			<label class="control-label" for="pixel-aspect-ratio">像素纵横比</label>
			<div class="controls">
				<select id="pixel-aspect-ratio" class="config-select-large" name="pixel_aspect_ratio">
					$_select[pixel_aspect_ratio]
				</select>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_pixel_aspect_ratio" value="novalue" $_localui_btn_disable>设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info_pixel_aspect_ratio" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info_pixel_aspect_ratio" class="config-help-info">
					7英寸Pi触控的矩形（默认）或方形像素。
                </span>
			</div>

			<label class="control-label" for="scnrotate">旋转屏幕</label>
			<div class="controls">
				<select id="scnrotate" class="config-select-large" name="scnrotate">
					$_select[scnrotate]
				</select>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_scnrotate" value="novalue" $_localui_btn_disable>设置</button>
			</div>
		</div>

		<div class="control-group">
			<legend>其他外围设备</legend>

			<div class="$_feat_gpio">
				<label class="control-label">GPIO按钮</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-gpio-svc" for="toggle-gpio-svc-2">开</label>$_select[gpio_svc_on]
						<label class="toggle-radio toggle-gpio-svc" for="toggle-gpio-svc-1">关</label>$_select[gpio_svc_off]
					</div>
					<button id="btn-set-gpio-svc" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_gpio_svc" value="novalue">设置</button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-gpio-svc" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
					<span id="info-gpio-svc" class="config-help-info">
						将连接的硬件按钮映射到MPD播放或其他命令。By @Cyanoazimin.
                    </span>
				</div>

				<div class="controls">
					<a href="gpio-config.php"><button class="btn btn-medium btn-primary config-btn">编辑</button></a>
					<span class="config-btn-after">GPIO引脚映射</span>
				</div>
			</div>

			<label class="control-label">LCD更新</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-lcdup" for="toggle-lcdup-2">开</label>$_select[lcdup_on]
					<label class="toggle-radio toggle-lcdup" for="toggle-lcdup-1">关</label>$_select[lcdup_off]
				</div>
				<button id="btn-set-lcdup" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_lcdup" value="novalue">设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-lcdup" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-lcdup" class="config-help-info">
					每当用户界面状态发生变化时，LCD更新引擎都会运行lcd-updater.py脚本。<br>
					存根lcd-updater.py脚本位于/var/local/www/commandw/目录中。
                </span>
			</div>
		</div>
	</form>
</div>
</div>

<form class="form-horizontal" method="post">
	<div id="restart-localui" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="restart-localui-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>重新启动本地显示吗？</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="update_restart_localui" value="novalue">是</button>
		</div>
	</div>
</form>
